//
//  FQICustomViewController.swift
//  YQInformation
//
//  Created by Max on 2017/11/2.
//  Copyright © 2017年 com.vector. All rights reserved.
//

import UIKit

class FQICustomViewController: FQIViewController {

    var slider = LiuXSlider()
    var sliders = LiuXSlider()
    

    @IBOutlet weak var totalLabel: UILabel!
    @IBOutlet weak var lowLabel: UILabel!
    @IBOutlet weak var heightLabel: UILabel!
    
    @IBOutlet weak var separatImage: UIImageView!
    @IBOutlet weak var customButton: UIButton!

    
    @IBOutlet weak var dayButton: UIButton!
    @IBOutlet weak var monthButton: UIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        customButton.addCorner()
        totalLabel.text = "--元"
        if self.navigationItem.leftBarButtonItem != nil {
            let btn = UIButton(type: UIButtonType.custom)
            self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: btn)
        }
        
        let arry = [1000,2000,3000,4000,5000,6000,7000,8000,9000,10000]
        
        slider = LiuXSlider.init(frame: CGRect(x: 20, y: self.totalLabel.frame.origin.y + 60, width:UIScreen.main.bounds.size.width - 40, height: 30), titles: arry, firstAndLastTitles: nil, defaultIndex: 0, sliderImage: UIImage(named: "26"))
        self.view.addSubview(slider)
        
        let arrys = [7,14,21,28,35,42]
        sliders = LiuXSlider.init(frame: CGRect(x: 20, y: self.monthButton.frame.origin.y + 70, width:UIScreen.main.bounds.size.width - 40, height: 30), titles: arrys, firstAndLastTitles: nil, defaultIndex: 0, sliderImage: UIImage(named: "26"))
        self.view.addSubview(sliders)
        
//        sliders.block = {(valueChangeBlock) -> Void in
//         
//           self.totalLabel.text = String(Double(arry[Int(valueChangeBlock)]) + Double(arry[Int(valueChangeBlock)])*0.006 + 30) + "元"
//        }
//        
//        slider.block = {(valueChangeBlock) -> Void in
//          
//           self.totalLabel.text = String(Double(arry[Int(valueChangeBlock)]) + Double(arry[Int(valueChangeBlock)])*0.006 + 30) + "元"
//
//        }

        
    }

    
    @IBAction func chooseTimeAction(_ sender: Any) {
  
    
    
    }
    
    
    @IBAction func customAction(_ sender: Any) {
   
        
    }
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

 
}
